import Vue from 'vue'
import Router from 'vue-router'

import CustomerManage from '../views/CustomerManage.vue'
import AssessmentService from '../views/AssessmentService.vue'
import FamilyDoctor from '../views/FamilyDoctor.vue'
import GoodsManage from '../views/GoodsManage.vue'
import KnowledgeBase from '../views/KnowledgeBase.vue'
import MedicalService from '../views/MedicalService.vue'
import OrderManage from '../views/OrderManage.vue'
import SystemManage from '../views/SystemManage.vue'
import UserList from '../views/CustomerManage/UserList.vue'
import ClassList from '../views/CustomerManage/ClassList.vue'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: '首页',
    redirect: '/SystemManage'
  }, {
    path: '/CustomerManage',
    redirect: '/CustomerManage/userList',
    name: '客户管理',
    component: CustomerManage,
    children: [{
      path: '/CustomerManage/userList',
      name: '用户列表',
      component: UserList
    }, {
      path: '/CustomerManage/classList',
      name: '分类列表列表',
      component: ClassList
    }]
  }, {
    path: '/AssessmentService',
    name: '评估服务',
    component: AssessmentService
  }, {
    path: '/FamilyDoctor',
    name: '家庭医生',
    component: FamilyDoctor
  }, {
    path: '/GoodsManage',
    name: '商品管理',
    component: GoodsManage
  }, {
    path: '/KnowledgeBase',
    name: '知识库',
    component: KnowledgeBase
  }, {
    path: '/MedicalService',
    name: '医疗服务',
    component: MedicalService
  }, {
    path: '/OrderManage',
    name: '预约管理',
    component: OrderManage
  }, {
    path: '/SystemManage',
    name: '系统管理',
    component: SystemManage
  }]
})